package com.smile.service.entity.services;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Data
@ToString
public class FileuploadStartEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 对象存储桶名称
     */
    @JSONField(name = "bucket")
    private String bucket;

    /**
     * 凭证信息
     */
    @JSONField(name = "credentials")
    private Credentials credentials;

    @Data
    @ToString
    public static class Credentials {
        @JSONField(name = "access_key_id")
        private String accessKeyId;

        @JSONField(name = "access_key_secret")
        private String accessKeySecret;

        @JSONField(name = "expire")
        private Long expire;

        @JSONField(name = "security_token")
        private String securityToken;
    }

    @JSONField(name = "endpoint")
    private String endpoint;

    @JSONField(name = "params")
    private Params params;

    @Data
    @ToString
    public static class Params {

        @JSONField(name = "files")
        private List<File> files;

    }

    @Data
    public static class File {
        private List<Map<String, Integer>> list;
        @JSONField(name = "module")
        private String module;

        @JSONField(name = "object_key")
        private String objectKey;
    }

    @JSONField(name = "provider")
    private String provider;

    @JSONField(name = "region")
    private String region;


}
